//
//  ReadDirectoryIViewController.m
//  Reading
//
//  Created by 军哥 on 15-1-27.
//  Copyright (c) 2015年 军哥. All rights reserved.
//

#import "ReadDirectoryIViewController.h"
#import "Fenlei-mulu-Cell.h"
#import "ReadArticleViewController.h"
@interface ReadDirectoryIViewController ()<UITableViewDataSource,UITableViewDelegate>

@end

@implementation ReadDirectoryIViewController
- (void)dealloc
{
    [_table release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"分类阅读目录";
    self.view.backgroundColor = [UIColor orangeColor];
    
    //分类目录tabelVIew
    self.table = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.table.delegate = self;
    self.table.dataSource = self;
    self.table.separatorStyle = UITableViewCellAccessoryCheckmark;
    [self.view addSubview:_table];
    [_table release];

    
    
    
    
    
    
    
    
    
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *str = @"jun";
    Fenlei_mulu_Cell *cell = [tableView dequeueReusableCellWithIdentifier:str];
    if (cell == nil) {
        cell = [[[Fenlei_mulu_Cell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:str]autorelease];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 180;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    ReadArticleViewController *readAt = [[ReadArticleViewController alloc]init];
    [self.navigationController pushViewController:readAt animated:YES];
    [readAt release];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
